import 'package:flutter/material.dart';

/// FileName radius_decoration
///
/// @Author lax
/// @Date 2023/11/4
///
/// @Description

class RadiusDecoration extends BoxDecoration {
  RadiusDecoration({
    Color? color = Colors.transparent,
    double radius = 5,
  }) : super(
          color: color,
          borderRadius: BorderRadius.circular(radius),
        );

  RadiusDecoration.left({
    Color? color = Colors.transparent,
    double radius = 5,
  }) : super(
          color: color,
          borderRadius: BorderRadius.horizontal(left: Radius.circular(radius)),
        );

  RadiusDecoration.right({
    Color? color = Colors.transparent,
    double radius = 5,
  }) : super(
          color: color,
          borderRadius: BorderRadius.horizontal(right: Radius.circular(radius)),
        );

  RadiusDecoration.top({
    Color? color = Colors.transparent,
    double radius = 5,
  }) : super(
          color: color,
          borderRadius: BorderRadius.vertical(top: Radius.circular(radius)),
        );

  RadiusDecoration.bottom({
    Color? color = Colors.transparent,
    double radius = 5,
  }) : super(
          color: color,
          borderRadius: BorderRadius.vertical(bottom: Radius.circular(radius)),
        );

  RadiusDecoration.only({
    Color? color = Colors.transparent,
    double topLeft = 0,
    double topRight = 0,
    double bottomLeft = 0,
    double bottomRight = 0,
  }) : super(
          color: color,
          borderRadius: BorderRadius.only(
            topLeft: Radius.circular(topLeft),
            topRight: Radius.circular(topRight),
            bottomLeft: Radius.circular(bottomLeft),
            bottomRight: Radius.circular(bottomRight),
          ),
        );
}
